package com.wwwarehouse.dubbo;

import com.alibaba.dubbo.config.annotation.Reference;
import com.google.common.collect.Lists;
import com.wwwarehouse.commons.dubbo.DubboContextUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
public class TestController {

    @Reference
    TestApi testApi;

    @GetMapping("/")
    public void test() {
        Model<String> model = new Model<>();
        model.setCollection(Lists.newArrayList("1", "2"));
        model.setName("name");
        HashMap<String, String> map = new HashMap<>();
        map.put("key", "value");
        model.setMap(map);
        testApi.normal5(Lists.newArrayList(model), EnumNormal.FRI);
//        DubboContextUtil.getContextUtil().getAttachment("")
    }
}
